import request from '@/utils/request'


// 查询设备部署管理列表
export function listManager(query) {
  return request({
    url: '/device/placeManager/listJiankong',
    method: 'get',
    params: query
  })
}

// 获取设备数量
export function reqGetCountDeploymentStatus(params) {
  return request({
    url: '/deployment/system/countDeploymentStatus',
    method: 'get',
    params
  })
}

// // 远程拉取日志
// export function reqRemoteGetLogFile(params) {
//   return request({
//     url: '/remote/getLogFile',
//     method: 'post',
//     params
//   })
// }
// 远程拉取日志(新)
export function reqRemoteGetLogFile(params) {
  return request({
    url: '/remote/getLogFile',
    method: 'get',
    params
  })
}
// 远程重启
export function reqRemoteRestart(data) {
  return request({
    url: '/remote/restart',
    method: 'post',
    data
  })
}

// 远程自检
export function reqRemoteSelfCheck(data) {
  return request({
    url: '/remote/selfcheck',
    method: 'post',
    data
  })
}

// 远程关机
export function reqRemoteShutdown(data) {
  return request({
    url: '/remote/shutdown',
    method: 'post',
    data
  })
}

// 根据设备ID获取部署信息
export function reqDeploymentByDeviceId(params) {
  return request({
    url: '/deployment/system/selectDvDeploymentByDeviceId',
    method: 'get',
    params
  })
}

// 根据设备ID获取部设备当前模块信息
export function reqDeploymentModuleByDeviceId(params) {
  return request({
    url: '/deployment/system/selectDvDeploymentModuleByDeviceId',
    method: 'get',
    params
  })
}


// 获取设备运行参数
export function reqSystemByDeviceId(params) {
  return request({
    url: '/deployment/system/selectSystemByDeviceId',
    method: 'get',
    params
  })
}

// 获取设备配置信息
export function reqDeviceByDeviceCode(params) {
  return request({
    url: '/deployment/system/selectDeviceByDeviceCode',
    method: 'get',
    params
  })
}

// 获取发布远程拉取截屏信息
export function reqGetPublishScreenshot(data) {
  return request({
    url: '/device/screenshot/publishGetScreenshot',
    method: 'post',
    data
  })
}

// 获取数据库最后一次的截屏 进入页面时调用
export function reqGetScreenshotLastTime(params) {
  return request({
    url: '/device/screenshot/getScreenShot',
    method: 'get',
    params
  })
}

// 获取拉取日志流水号
export function reqGetLogMessageCode(data) {
  return request({
    url: '/remote/remotegetLogFile',
    method: 'post',
    data
  })
}

// 下载日志
export function reqGetLogFile(params) {
  return request({
    url: '/remote/getLogFile',
    method: 'get',
    params,
    responseType: "blob",
  })
}

